1. Field
The present embodiments relates generally to an instruction for producing two independent sums of absolute differences.
2. Background
Currently, motion estimation is a widely used method for encoding/compressing video information. In block-based motion estimation, each video frame is partitioned into blocks (pixel arrays), such as blocks of 16×16, 8×8, or 4×4 pixels. FIG. 1 is a conceptual diagram of a motion estimation method. As shown in FIG. 1, for a current block 110 of a current frame 105, a search is performed in a search area 120 of a reference frame 115 (e.g., the frame prior to or after the current frame) for a block it best matches (in terms of pixel values). When the best matching block 125 is found in the reference frame 115, a motion vector 130 (indicating the displacement of the best matching block 125 in relation to the current block 110) and the pixel value differences with the current block 110 are used to encode the current block. This process is repeated for each block of the current frame.
Techniques for determining the block in the reference frame that best matches the current block typically use a criterion (such as mean absolute error (MAE) or mean absolute difference (MAD) criterion) which is determined using sum-of-absolute-differences (SAD) operations. In these techniques, the sum-of-absolute-differences of pixel values between the current block and each block in the search area of the reference frame is computed. A SAD operation performed on a current block having pixels values Ai and a reference block having pixels values Bi, can be represented by the equation:Σ|Ai−Bi|=C. 
A SAD operation is performed for each reference block in the search area and the reference block having the lowest SAD value (C) is selected as the best matching block. However, the large number of SAD operations required in motion estimation is computationally intensive and can consume a large amount of processing time and resources. As such, there is a need for an efficient way to perform SAD operations.